import java.util.StringTokenizer;


public class IndexOfFunction {
	
	/**
	 * @param args
	 */
	public static void main(String[] args){
		String s1 = "Ibu Ali Pergi Ke Pasar";
		System.out.println(s1.indexOf("Pergi"));
		
		StringTokenizer st = new StringTokenizer(s1);
		while(st.hasMoreTokens()){
			System.out.println(st.nextToken());
		}
	}
}
